<template>
    <div id="report" :style="x">
        
    </div>
</template>
<script>
    import echarts from 'echarts'
    export default {
        name:'vReport',
        props:['x'],
        components:{echarts},
        data(){
            return {
               option : {
                    title: {
                        text: '趋势图'
                    },
                    xAxis:  {
                        type: 'category',
                        offset:20,
                        gridIndex:0,
                        boundaryGap: false,
                        data: ['','2017-4-10','2017-4-11','2017-4-12','2017-4-13','2017-4-14','2017-4-15','2017-4-16'],
                        scale:"true",
                        axisLabel:{
                            showMinLabel:false
                        }
                    },
                    yAxis: {
                        type: 'value',
                        max:30,
                        splitNumber:3,
                        axisLabel:{
                            formatter:'{value}',
                            showMinLabel:false
                        },
                        axisLine:{
                            show:false
                        },
                        axisTick:{
                            show:false
                        }
                    },
                    series: [
                        {
                            name:'最高气温',
                            type:'line',
                            data:['',10, 20, 10, 10, 10, 30, 10],
                            lineStyle:{
                                normal:{
                                    color:'#0066FF'
                                }
                            },
                            itemStyle:{
                                normal:{
                                    color:'#0066FF'
                                }
                            },
                            symbol:'circle',
                            symbolSize:6
                        }
                    ]
                }

            }
        },
        mounted:function(){
            echarts.init(document.getElementById("report")).setOption(this.option)
        }
        
    }
</script>
<style scoped>

</style>
